#coding:utf-8
'''
Created on 2018年7月30日

@author: leixun
'''
import sys
import time,datetime
def process_file(r):
    nowname = ""
    dict = {
    '宋彬彬':'SXC1904',
    '雷勋':'SXC2010',
    '万修起':'SXC3645',
    '陈俊':'SXC2353',
    '梁雷':'SXC3097',
    '齐泽威':'SXC3790',
    '康晓磊':'SXC4049',
    '李向月':'SXC3081',
    '张臣周':'SXC2695',
    '颜克良':'SXC2931'
    }
    result = ""
    lastline = ''
    for line in r:
        line = line.strip()
        if line.startswith('#') or not len(line):
            continue
        if line.startswith(('2')): ## dd
            timeArray = time.strptime(line[0:10], "%Y-%m-%d")
            timeTemp = str(timeArray.tm_mon)+"."+str(timeArray.tm_mday)
            if lastline.startswith('2'):
                result = result + "、"+timeTemp
            else:
                result = result + " "+timeTemp
        else:
            if dict.has_key(line):
                if result.strip() == '':
                    result = result+"工号"+dict[line]
                else:
                    result = result + "报销餐费;" + "工号"+dict[line]
            else:
                print line + "不存在"
        lastline = line
    return result+"报销餐费;"

if __name__=="__main__":
    print "start"
    input_file=open(sys.argv[1],'r')
    result = process_file(input_file)
    input_file.close()
    output_file = open("result.txt",'wb')
    print result
    output_file.write(result)
    output_file.close()